Skip to content

feat: remove page hide event from triggering unload event listener #31853

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jun 11, 2025

Conversation

jennifer-shehane
Copy link
Member

@jennifer-shehane jennifer-shehane commented Jun 9, 2025

BREAKING: remove page hide event from triggering unload event listener

Additional details

This is removing emitting the pagehide event in the window:unload listener - this change is not intended to impact any internal listening of the pagehide event for Cypress functionality.

The deprecation of window:unload listener is a separate piece of work and not breaking outlined here: #29524

Steps to test

How has the user experience changed?

PR Tasks

BREAKING: remove page hide event from triggering unload event listener
Copy link

cypress bot commented Jun 9, 2025

cypress    Run #62959

Run Properties:  status check passed Passed #62959  •  git commit f3f32749f9: fix test
Project cypress
Branch Review remove-pagehide-from-unload-listener
Run status status check passed Passed #62959
Run duration 19m 56s
Commit git commit f3f32749f9: fix test
Committer Jennifer Shehane
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 11
Tests that did not run due to a developer annotating a test with .skip  Pending 1097
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 26525
View all changes introduced in this branch ↗︎
UI Coverage  44.86%
  Untested elements 188  
  Tested elements 157  
Accessibility  92.89%
  Failed rules  3 critical   9 serious   2 moderate   2 minor
  Failed elements 671  

@jennifer-shehane jennifer-shehane changed the base branch from develop to release/15.0.0 June 10, 2025 13:09
@jennifer-shehane jennifer-shehane self-assigned this Jun 10, 2025
Copy link
Contributor

@cacieprins cacieprins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tentatively approved - I'd like to emit a pagehide event, in case users wanted to move to that from unload. We can always add that back in if requested..

Should we warn/throw if a user tries to listen to window:unload in chromium?

@jennifer-shehane
Copy link
Member Author

@cacieprins We want to deprecate window:unload listener, but that didn't have to be in the breaking change release. Definitely not going to add the page:hide listener since this current listener is really rarely used already.

@jennifer-shehane jennifer-shehane merged commit 32313ca into release/15.0.0 Jun 11, 2025
84 of 89 checks passed
@jennifer-shehane jennifer-shehane deleted the remove-pagehide-from-unload-listener branch June 11, 2025 18:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants